<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('图片列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>对象编号：</label>
                                <input type="text" name="picId"/>
                            </li>
                            <li>
                                <label>图片描述：</label>
                                <input type="text" name="describe"/>
                            </li>
                            <li>
                                <label>图片URL：</label>
                                <input type="text" name="url"/>
                            </li>
                            <li>
                                <label>图片排序：</label>
                                <input type="text" name="imgOrder"/>
                            </li>
                            <li>
                                <label>图片是否有效 1有效，2无效：</label>
                                <select name="status">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>类别 1商品，2用户：</label>
                                <select name="proType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>图片类型 1首页图片，2轮播banner图，3详情图，4营业执照，5身份证正面，6身份证反面，7银行卡照片，8 规格图 9身份证手持 10食品卫生许可证 11消息列表图标：</label>
                                <select name="type">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="BusinessInfo:BusinessInfo:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="BusinessInfo:BusinessInfo:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="BusinessInfo:BusinessInfo:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="BusinessInfo:BusinessInfo:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('BusinessInfo:BusinessInfo:edit')}]];
        var removeFlag = [[${@permission.hasPermi('BusinessInfo:BusinessInfo:remove')}]];
        var prefix = ctx + "BusinessInfo/BusinessInfo";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "图片",
                clickToSelect:true,
                columns: [{
                    checkbox: true
                },
                {
                    field: 'picId',
                    title: '对象编号'
                },
                {
                    field: 'describe',
                    title: '图片描述'
                },
                {
                    field: 'url',
                    title: '图片URL'
                },
                {
                    field: 'imgOrder',
                    title: '图片排序'
                },
                {
                    field: 'status',
                    title: '图片是否有效 1有效，2无效'
                },
                {
                    field: 'proType',
                    title: '类别 1商品，2用户'
                },
                {
                    field: 'type',
                    title: '图片类型 1首页图片，2轮播banner图，3详情图，4营业执照，5身份证正面，6身份证反面，7银行卡照片，8 规格图 9身份证手持 10食品卫生许可证 11消息列表图标'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>